package de.islanders.gameobject;

import de.islanders.interfaces.Equipable;
import de.islanders.unit.player.Player;
import de.islanders.world.Position;

public class Weapon extends Arms {
	private int minDamage,
				maxDamage,
				damageType;
	private double speed;
	
	public Weapon(String name, double weight, double scaling, Position position, int minDamage, int maxDamage, double speed) {
		super(name, weight, scaling, position);
		this.maxDamage = maxDamage;
		this.minDamage = minDamage;
		this.speed = speed;
	}

	/**
	 * @return the minDamage
	 */
	public int getMinDamage() {
		return minDamage;
	}

	/**
	 * @param minDamage the minDamage to set
	 */
	public void setMinDamage(int minDamage) {
		this.minDamage = minDamage;
	}

	/**
	 * @return the maxDamage
	 */
	public int getMaxDamage() {
		return maxDamage;
	}

	/**
	 * @param maxDamage the maxDamage to set
	 */
	public void setMaxDamage(int maxDamage) {
		this.maxDamage = maxDamage;
	}

	/**
	 * @return the speed
	 */
	public double getSpeed() {
		return speed;
	}

	/**
	 * @param speed the speed to set
	 */
	public void setSpeed(double speed) {
		this.speed = speed;
	}

	/**
	 * @return the damageType
	 */
	public int getDamageType() {
		return damageType;
	}

	/**
	 * @param damageType the damageType to set
	 */
	public void setDamageType(int damageType) {
		this.damageType = damageType;
	}

	public void onUse(Player player) {
		player.equip(this);
	}

	@Override
	public String onExamine() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void onDelete(Player player) {
		player.getInventory().getItems().remove(this);
	}

	@Override
	public void compareTo(Equipable item) {
		// TODO Auto-generated method stub
		
	}
}
